$OpenBSD: patch-Makefile,v 1.4 2015/06/26 18:27:33 ajacoutot Exp $
--- Makefile.orig	Thu Mar 16 19:59:17 2006
+++ Makefile	Fri Jun 26 20:20:03 2015
@@ -1,8 +1,8 @@
 PACKAGE ?= gkrellsun
 
-GTK_CONFIG ?=pkg-config gtk+-2.0
-GTK_INCLUDE ?= `pkg-config gtk+-2.0 --cflags`
-GTK_LIB ?= `pkg-config gtk+-2.0 --libs`
+GTK_CONFIG ?=pkg-config gtk+-2.0 gthread-2.0
+GTK_INCLUDE ?= `pkg-config gtk+-2.0 gthread-2.0 --cflags`
+GTK_LIB ?= `pkg-config gtk+-2.0 gthread-2.0 --libs`
 
 INSTALL ?= install
 
@@ -11,10 +11,10 @@ INSTALLDIR ?= $(DESTDIR)$(PREFIX)
 PLUGINDIR ?= $(INSTALLDIR)/lib/gkrellm2/plugins
 LOCALEDIR ?= $(INSTALLDIR)/share/locale
 
-FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE)
+FLAGS += -fPIC $(GTK_INCLUDE) -I${LOCALBASE}/include
 #FLAGS = -g -Wall -fPIC $(GTK_INCLUDE)
-LIBS = $(GTK_LIB)
-LFLAGS = -shared
+LIBS += $(GTK_LIB)
+LFLAGS += -shared -pthread
 
 ifeq ($(enable_nls),1)
 	FLAGS += -DENABLE_NLS -DLOCALEDIR=\"$(LOCALEDIR)\"
@@ -23,9 +23,9 @@ endif
 FLAGS += -DPACKAGE="\"$(PACKAGE)\""
 export PACKAGE LOCALEDIR
 
-CC = gcc $(CFLAGS) $(FLAGS)
-
 OBJS = gkrellsun.o CalcEphem.o Moon.o MoonRise.o
+
+CFLAGS += $(FLAGS)
 
 IMAGES = ../images/osun.xpm ../images/uvsun.xpm \
          ../images/star.xpm ../images/dot.xpm \
